<!DOCTYPE html>
<html lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>segment_characters [HALCON算子参考手册]</title>
<style type="text/css">
      body {
    color: #000000;
    background-color: #ffffff;
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
}

.body_main {
    margin-left: 35px;
    margin-right: 35px;
}

@media screen and (min-width:992px) {

    .body_main {
        margin-left: 10%;
        margin-right: 10%;
    }

    table.toctable {
        width: 80%
    }
}

@media screen and (min-width:1400px) {

    .body_main {
        margin-left: 15%;
        margin-right: 15%;
    }

    table.toctable {
        width: 70%
    }
}

body>div ul ul {
    margin-left: inherit;
}

a:link {
    color: #0044cc;
}

a:link,
a:visited {
    text-decoration: none;
}

a:link:hover,
a:visited:hover {
    text-decoration: underline;
}

th {
    text-align: left;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    text-rendering: optimizeLegibility;
    color: #666666;
}

code {
    font-family: monospace,monospace;
}

h1 a.halconoperator {
    font-family: Arial, Helvetica, sans-serif;
    color: #666666;
}

h2 a.halconoperator {
    font-family: Arial, Helvetica, sans-serif;
    color: #666666;
}

hr {
    border: 0;
    border-top: solid 1px #f28d26;
}

.pre {
    display: block;
    padding-bottom: 1ex;
    font-family: monospace;
    white-space: pre;
}

pre {
    font-family: monospace, monospace;
    padding: 1ex;
    white-space: pre-wrap;
}

.toc {
    font-size: 80%;
    border-top: 1px dashed #f28d26;
    border-bottom: 1px dashed #f28d26;
    padding-top: 5px;
    padding-bottom: 5px;
}

.inv {
    margin: 0;
    border: 0;
    padding: 0;
}

.banner {
    color: #666666;
    padding-left: 1em;
}

.logo {
    background-color: white;
}

.keyboard {
    font-size: 80%;
    padding-left: 3px;
    padding-right: 3px;
    border-radius: 5px;
    border-width: 1px;
    border-style: solid;
    border-color: #f28d26;
    background-color: #f3f3f3;
}

.warning {
    margin-top: 2ex;
    margin-bottom: 1ex;
    padding: 10px;
    text-align: center;
    border: 1px solid;
    color: #bb0000;
    background-color: #fff7f7
}

.imprint {
    margin-top: 1ex;
    font-size: 80%;
    color: #666666;
}

.imprinthead {
    font-weight: bolder;
    color: #666666;
}

.indexlink {
    text-align: right;
    padding-bottom: 5px;
}

.postscript {
    margin-top: 2ex;
    font-size: 80%;
    color: #666666
}

.evenrow {
    background-color: #e7e7ef;
    vertical-align: top;
}

.oddrow {
    background-color: #f7f7ff;
    vertical-align: top;
}

.headrow {
    background-color: #97979f;
    color: #ffffff;
    vertical-align: top;
}

.logorow {
    vertical-align: top;
}

.error {
    color: red;
}

.var {
    font-style: italic
}

.halconoperator {
    font-family: monospace, monospace;
}

span.operator {
    font-family: monospace, monospace;
}

span.procedure {
    font-family: monospace, monospace;
}

span.operation {
    font-family: monospace, monospace;
}

span.feature {
    font-family: Arial, Helvetica, Homerton, sans-serif;
}

ul {
    padding-left: 1.2em;
}

li.dot {
    list-style-type: square;
    color: #f28d26;
}

.breadcrumb {
    font-size: 80%;
    color: white;
    background-color: #062d64;
    margin-bottom: 20px;
    padding-left: 35px;
    padding-right: 35px;
    padding-bottom: 15px;
}

.webbar {
    font-size: 80%;
    background-color: #dddddd;
    margin-top: 0px;
    margin-left: -35px;
    margin-right: -35px;
    margin-bottom: 0px;
    padding-top: 5px;
    padding-left: 35px;
    padding-right: 35px;
    padding-bottom: 5px;
}

.footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    border-top: 1px dashed #f28d26;
    font-size: 80%;
    color: #666666;
    padding-bottom: 8px;
}

.footer .socialmedia a {
    padding-left: 7px;
}

.socialmedia {
    padding-top: 10px;
}

.copyright {
    margin-top: 19px;
}

.breadcrumb a {
    color: #ffffff;
    border-bottom: 1px solid white;
}

.breadcrumb a:link:hover,
.breadcrumb a:visited:hover {
    text-decoration: none;
    border-bottom: none;
}

.heading {
    margin-top: 1ex;
    font-size: 110%;
    font-weight: bold;
    color: #666666;
}

.text {
    color: black;
}

.example {
    font-size: 80%;
    background-color: #f3f3f3;
    border: 1px dashed #666666;
    padding: 10px;
}

.displaymath {
    display: block;
    text-align: center;
    margin-top: 1ex;
    margin-bottom: 1ex;
}

.title {
    float: left;
    padding-top: 3px;
    padding-bottom: 3px;
}

.signnote {
    font-family: Arial, Helvetica, Homerton, sans-serif;
    font-size: 80%;
    color: #666666;
    font-weight: lighter;
    font-style: italic
}

.par {
    margin-bottom: 1.5em;
}

.parhead {
    text-align: right;
}

.parname {
    float: left;
}

.pardesc {
    font-size: 85%;
    margin-top: 0.5em;
    margin-bottom: 0.5em;
    margin-left: 2em;
}

.parcat {
    color: #666;
    font-weight: bold;
}

*[data-if=cpp],
*[data-if=c],
*[data-if=dotnet],
*[data-if=com],
*[data-if=python] {
    display: none;
}

.tabbar {
    text-align: right;
    border-bottom: 1px solid #f28d26;
    margin-bottom: 0.5em;
}

ul.tabs {
    padding-top: 3px;
    padding-bottom: 3px;
    margin-top: 10px;
    margin-bottom: 0;
    font-size: 80%
}

ul.tabs li {
    padding-top: 3px;
    padding-bottom: 3px;
    display: inline;
    overflow: hidden;
    list-style-type: none;
    margin: 0;
    margin-left: 8px;
    border-top: 1px solid #666;
    border-left: 1px solid #666;
    border-right: 1px solid #666;
}

ul.tabs li.active {
    border-left: 1px solid #f28d26;
    border-right: 1px solid #f28d26;
    border-top: 1px solid #f28d26;
    border-bottom: 1px solid #fff;
}

ul.tabs li.inactive {
    background-color: #eee;
}

ul.tabs li a {
    padding-left: 5px;
    padding-right: 5px;
    color: #666;
}

ul.tabs li a:link:hover {
    text-decoration: none;
}

ul.tabs li.inactive a {
    color: #666;
}

ul.tabs li.active a {
    color: black;
}

dl.generic dd {
    margin-bottom: 1em;
}

.pari {
    color: olive;
}

.paro {
    color: maroon;
}

.comment {
    font-size: 80%;
    color: green;
    white-space: nowrap;
}

table.grid {
    border-collapse: collapse;
}

table.grid td {
    padding: 5px;
    border: 1px solid;
}

table.layout {
    border: 0px;
}

table.layout td {
    padding: 5px;
}

table.table {
    border-collapse: collapse;
}

table.table td {
    padding: 5px;
    border-left: 0px;
    border-right: 0px;
}

table.table tr:last-child {
    border-bottom: 1px solid;
}

table.table th {
    padding: 5px;
    border-top: 1px solid;
    border-bottom: 1px solid;
    border-left: 0px;
    border-right: 0px;
}

.details_summary {
    cursor: pointer;
}

table.toctable {
    width: 100%;
}

table.toctable col:first-child {
    width: 20%;
}

table.toctable col:nth-last-child(2) {
    width: 8%;
}

table.altcolored tr:nth-child(even) {
    background-color: #f3f3f3;
}

    </style>
<!--OP_REF_STYLE_END-->
<script>
    <!--
var active_lang='hdevelop';function switchVisibility(obj,active_lang,new_lang)
{var display_style='inline';
for(var i=0;i<obj.length;i++)
{if(obj.item(i).getAttribute('data-if')==new_lang)
{obj.item(i).style.display=display_style;}
if(obj.item(i).getAttribute('data-if')==active_lang)
{obj.item(i).style.display='none';}}
return;}
function toggleLanguage(new_lang,initial)
{if(active_lang!=new_lang)
{var lis=document.getElementsByTagName('li');for(var i=0;i<lis.length;i++)
{if(lis.item(i).id=='syn-'+new_lang)
{lis.item(i).className='active';}
else
{lis.item(i).className='inactive';}}
var divs=document.getElementsByTagName('div');var spans=document.getElementsByTagName('span');switchVisibility(divs,active_lang,new_lang);switchVisibility(spans,active_lang,new_lang);if(!initial)
{setCookie("halcon_reference_language",new_lang,null,null);}
active_lang=new_lang;}
return;}
function setCookie(name,value,domain,exp_offset,path,secure)
{localStorage.setItem(name,value);}
function getCookie(name)
{return localStorage.getItem(name);}
function initialize()
{var qs=location.href.split('?')[1];var qs_lang_raw=location.href.split('interface=')[1];var qs_lang;if(qs_lang_raw)
{qs_lang=qs_lang_raw.split('#')[0];}
var cookie_lang=getCookie("halcon_reference_language");var new_lang;if((qs_lang=="hdevelop")||(qs_lang=="dotnet")||(qs_lang=="python")||(qs_lang=="cpp")||(qs_lang=="c"))
{new_lang=qs_lang;setCookie("halcon_reference_language",new_lang,null,null);}
else if((cookie_lang=="hdevelop")||(cookie_lang=="dotnet")||(cookie_lang=="python")||(cookie_lang=="cpp")||(cookie_lang=="c"))
{new_lang=cookie_lang;}
else
{new_lang="hdevelop";}
toggleLanguage(new_lang,1);return;}
-->

  </script>
</head>
<body onload="initialize();">
<div class="breadcrumb">
<br class="inv"><a href="index.html">目录</a> / <a href="toc_ocr.html">OCR</a> / <a href="toc_ocr_segmentation.html">分割</a><br class="inv">
</div>
<div class="body_main">
<div class="tabbar"><ul class="tabs">
<li id="syn-hdevelop" class="active"><a href="javascript:void(0);" onclick="toggleLanguage('hdevelop')" onfocus="blur()">HDevelop</a></li>
<li id="syn-dotnet" class="inactive"><a href="javascript:void(0);" onclick="toggleLanguage('dotnet')" onfocus="blur()">.NET</a></li>
<li id="syn-python" class="inactive"><a href="javascript:void(0);" onclick="toggleLanguage('python')" onfocus="blur()">Python</a></li>
<li id="syn-cpp" class="inactive"><a href="javascript:void(0);" onclick="toggleLanguage('cpp')" onfocus="blur()">C++</a></li>
<li id="syn-c" class="inactive"><a href="javascript:void(0);" onclick="toggleLanguage('c')" onfocus="blur()">C</a></li>
</ul></div>
<div class="indexlink">
<a href="index_classes.html"><span data-if="dotnet" style="display:none;">类别</span><span data-if="cpp" style="display:none;">类别</span></a><span data-if="dotnet" style="display:none;"> | </span><span data-if="cpp" style="display:none;"> | </span><a href="index_by_name.html">算子列表</a>
</div>
<!--OP_REF_HEADER_END-->
<h1 id="sec_name">
<span data-if="hdevelop" style="display:inline;">segment_characters</span><span data-if="c" style="display:none;">T_segment_characters</span><span data-if="cpp" style="display:none;">SegmentCharacters</span><span data-if="dotnet" style="display:none;">SegmentCharacters</span><span data-if="python" style="display:none;">segment_characters</span> (算子名称)</h1>
<h2>名称</h2>
<p><code><span data-if="hdevelop" style="display:inline;">segment_characters</span><span data-if="c" style="display:none;">T_segment_characters</span><span data-if="cpp" style="display:none;">SegmentCharacters</span><span data-if="dotnet" style="display:none;">SegmentCharacters</span><span data-if="python" style="display:none;">segment_characters</span></code> — Segments characters in a given region of an image.</p>
<h2 id="sec_synopsis">参数签名</h2>
<div data-if="hdevelop" style="display:inline;">
<p>
<code><b>segment_characters</b>(<a href="#Region"><i>区域</i></a>, <a href="#Image"><i>Image</i></a> : <a href="#ImageForeground"><i>ImageForeground</i></a>, <a href="#RegionForeground"><i>RegionForeground</i></a> : <a href="#Method"><i>Method</i></a>, <a href="#EliminateLines"><i>EliminateLines</i></a>, <a href="#DotPrint"><i>DotPrint</i></a>, <a href="#StrokeWidth"><i>StrokeWidth</i></a>, <a href="#CharWidth"><i>CharWidth</i></a>, <a href="#CharHeight"><i>CharHeight</i></a>, <a href="#ThresholdOffset"><i>ThresholdOffset</i></a>, <a href="#Contrast"><i>Contrast</i></a> : <a href="#UsedThreshold"><i>UsedThreshold</i></a>)</code></p>
</div>
<div data-if="c" style="display:none;">
<p>
<code>Herror <b>T_segment_characters</b>(const Hobject <a href="#Region"><i>区域</i></a>, const Hobject <a href="#Image"><i>Image</i></a>, Hobject* <a href="#ImageForeground"><i>ImageForeground</i></a>, Hobject* <a href="#RegionForeground"><i>RegionForeground</i></a>, const Htuple <a href="#Method"><i>Method</i></a>, const Htuple <a href="#EliminateLines"><i>EliminateLines</i></a>, const Htuple <a href="#DotPrint"><i>DotPrint</i></a>, const Htuple <a href="#StrokeWidth"><i>StrokeWidth</i></a>, const Htuple <a href="#CharWidth"><i>CharWidth</i></a>, const Htuple <a href="#CharHeight"><i>CharHeight</i></a>, const Htuple <a href="#ThresholdOffset"><i>ThresholdOffset</i></a>, const Htuple <a href="#Contrast"><i>Contrast</i></a>, Htuple* <a href="#UsedThreshold"><i>UsedThreshold</i></a>)</code></p>
</div>
<div data-if="cpp" style="display:none;">
<p>
<code>void <b>SegmentCharacters</b>(const HObject&amp; <a href="#Region"><i>区域</i></a>, const HObject&amp; <a href="#Image"><i>Image</i></a>, HObject* <a href="#ImageForeground"><i>ImageForeground</i></a>, HObject* <a href="#RegionForeground"><i>RegionForeground</i></a>, const HTuple&amp; <a href="#Method"><i>Method</i></a>, const HTuple&amp; <a href="#EliminateLines"><i>EliminateLines</i></a>, const HTuple&amp; <a href="#DotPrint"><i>DotPrint</i></a>, const HTuple&amp; <a href="#StrokeWidth"><i>StrokeWidth</i></a>, const HTuple&amp; <a href="#CharWidth"><i>CharWidth</i></a>, const HTuple&amp; <a href="#CharHeight"><i>CharHeight</i></a>, const HTuple&amp; <a href="#ThresholdOffset"><i>ThresholdOffset</i></a>, const HTuple&amp; <a href="#Contrast"><i>Contrast</i></a>, HTuple* <a href="#UsedThreshold"><i>UsedThreshold</i></a>)</code></p>
<p>
<code><a href="HImage.html">HImage</a> <a href="HRegion.html">HRegion</a>::<b>SegmentCharacters</b>(const HImage&amp; <a href="#Image"><i>Image</i></a>, HRegion* <a href="#RegionForeground"><i>RegionForeground</i></a>, const HString&amp; <a href="#Method"><i>Method</i></a>, const HString&amp; <a href="#EliminateLines"><i>EliminateLines</i></a>, const HString&amp; <a href="#DotPrint"><i>DotPrint</i></a>, const HString&amp; <a href="#StrokeWidth"><i>StrokeWidth</i></a>, const HTuple&amp; <a href="#CharWidth"><i>CharWidth</i></a>, const HTuple&amp; <a href="#CharHeight"><i>CharHeight</i></a>, Hlong <a href="#ThresholdOffset"><i>ThresholdOffset</i></a>, Hlong <a href="#Contrast"><i>Contrast</i></a>, HTuple* <a href="#UsedThreshold"><i>UsedThreshold</i></a>) const</code></p>
<p>
<code><a href="HImage.html">HImage</a> <a href="HRegion.html">HRegion</a>::<b>SegmentCharacters</b>(const HImage&amp; <a href="#Image"><i>Image</i></a>, HRegion* <a href="#RegionForeground"><i>RegionForeground</i></a>, const HString&amp; <a href="#Method"><i>Method</i></a>, const HString&amp; <a href="#EliminateLines"><i>EliminateLines</i></a>, const HString&amp; <a href="#DotPrint"><i>DotPrint</i></a>, const HString&amp; <a href="#StrokeWidth"><i>StrokeWidth</i></a>, const HTuple&amp; <a href="#CharWidth"><i>CharWidth</i></a>, const HTuple&amp; <a href="#CharHeight"><i>CharHeight</i></a>, Hlong <a href="#ThresholdOffset"><i>ThresholdOffset</i></a>, Hlong <a href="#Contrast"><i>Contrast</i></a>, Hlong* <a href="#UsedThreshold"><i>UsedThreshold</i></a>) const</code></p>
<p>
<code><a href="HImage.html">HImage</a> <a href="HRegion.html">HRegion</a>::<b>SegmentCharacters</b>(const HImage&amp; <a href="#Image"><i>Image</i></a>, HRegion* <a href="#RegionForeground"><i>RegionForeground</i></a>, const char* <a href="#Method"><i>Method</i></a>, const char* <a href="#EliminateLines"><i>EliminateLines</i></a>, const char* <a href="#DotPrint"><i>DotPrint</i></a>, const char* <a href="#StrokeWidth"><i>StrokeWidth</i></a>, const HTuple&amp; <a href="#CharWidth"><i>CharWidth</i></a>, const HTuple&amp; <a href="#CharHeight"><i>CharHeight</i></a>, Hlong <a href="#ThresholdOffset"><i>ThresholdOffset</i></a>, Hlong <a href="#Contrast"><i>Contrast</i></a>, Hlong* <a href="#UsedThreshold"><i>UsedThreshold</i></a>) const</code></p>
<p>
<code><a href="HImage.html">HImage</a> <a href="HRegion.html">HRegion</a>::<b>SegmentCharacters</b>(const HImage&amp; <a href="#Image"><i>Image</i></a>, HRegion* <a href="#RegionForeground"><i>RegionForeground</i></a>, const wchar_t* <a href="#Method"><i>Method</i></a>, const wchar_t* <a href="#EliminateLines"><i>EliminateLines</i></a>, const wchar_t* <a href="#DotPrint"><i>DotPrint</i></a>, const wchar_t* <a href="#StrokeWidth"><i>StrokeWidth</i></a>, const HTuple&amp; <a href="#CharWidth"><i>CharWidth</i></a>, const HTuple&amp; <a href="#CharHeight"><i>CharHeight</i></a>, Hlong <a href="#ThresholdOffset"><i>ThresholdOffset</i></a>, Hlong <a href="#Contrast"><i>Contrast</i></a>, Hlong* <a href="#UsedThreshold"><i>UsedThreshold</i></a>) const  <span class="signnote">
            (
            Windows only)
          </span></code></p>
</div>
<div data-if="com" style="display:none;"></div>
<div data-if="dotnet" style="display:none;">
<p>
<code>static void <a href="HOperatorSet.html">HOperatorSet</a>.<b>SegmentCharacters</b>(<a href="HObject.html">HObject</a> <a href="#Region"><i>区域</i></a>, <a href="HObject.html">HObject</a> <a href="#Image"><i>image</i></a>, out <a href="HObject.html">HObject</a> <a href="#ImageForeground"><i>imageForeground</i></a>, out <a href="HObject.html">HObject</a> <a href="#RegionForeground"><i>regionForeground</i></a>, <a href="HTuple.html">HTuple</a> <a href="#Method"><i>method</i></a>, <a href="HTuple.html">HTuple</a> <a href="#EliminateLines"><i>eliminateLines</i></a>, <a href="HTuple.html">HTuple</a> <a href="#DotPrint"><i>dotPrint</i></a>, <a href="HTuple.html">HTuple</a> <a href="#StrokeWidth"><i>strokeWidth</i></a>, <a href="HTuple.html">HTuple</a> <a href="#CharWidth"><i>charWidth</i></a>, <a href="HTuple.html">HTuple</a> <a href="#CharHeight"><i>charHeight</i></a>, <a href="HTuple.html">HTuple</a> <a href="#ThresholdOffset"><i>thresholdOffset</i></a>, <a href="HTuple.html">HTuple</a> <a href="#Contrast"><i>contrast</i></a>, out <a href="HTuple.html">HTuple</a> <a href="#UsedThreshold"><i>usedThreshold</i></a>)</code></p>
<p>
<code><a href="HImage.html">HImage</a> <a href="HRegion.html">HRegion</a>.<b>SegmentCharacters</b>(<a href="HImage.html">HImage</a> <a href="#Image"><i>image</i></a>, out <a href="HRegion.html">HRegion</a> <a href="#RegionForeground"><i>regionForeground</i></a>, string <a href="#Method"><i>method</i></a>, string <a href="#EliminateLines"><i>eliminateLines</i></a>, string <a href="#DotPrint"><i>dotPrint</i></a>, string <a href="#StrokeWidth"><i>strokeWidth</i></a>, <a href="HTuple.html">HTuple</a> <a href="#CharWidth"><i>charWidth</i></a>, <a href="HTuple.html">HTuple</a> <a href="#CharHeight"><i>charHeight</i></a>, int <a href="#ThresholdOffset"><i>thresholdOffset</i></a>, int <a href="#Contrast"><i>contrast</i></a>, out <a href="HTuple.html">HTuple</a> <a href="#UsedThreshold"><i>usedThreshold</i></a>)</code></p>
<p>
<code><a href="HImage.html">HImage</a> <a href="HRegion.html">HRegion</a>.<b>SegmentCharacters</b>(<a href="HImage.html">HImage</a> <a href="#Image"><i>image</i></a>, out <a href="HRegion.html">HRegion</a> <a href="#RegionForeground"><i>regionForeground</i></a>, string <a href="#Method"><i>method</i></a>, string <a href="#EliminateLines"><i>eliminateLines</i></a>, string <a href="#DotPrint"><i>dotPrint</i></a>, string <a href="#StrokeWidth"><i>strokeWidth</i></a>, <a href="HTuple.html">HTuple</a> <a href="#CharWidth"><i>charWidth</i></a>, <a href="HTuple.html">HTuple</a> <a href="#CharHeight"><i>charHeight</i></a>, int <a href="#ThresholdOffset"><i>thresholdOffset</i></a>, int <a href="#Contrast"><i>contrast</i></a>, out int <a href="#UsedThreshold"><i>usedThreshold</i></a>)</code></p>
</div>
<div data-if="python" style="display:none;">
<p>
<code>def <b>segment_characters</b>(<a href="#Region"><i>区域</i></a>: HObject, <a href="#Image"><i>image</i></a>: HObject, <a href="#Method"><i>method</i></a>: str, <a href="#EliminateLines"><i>eliminate_lines</i></a>: str, <a href="#DotPrint"><i>dot_print</i></a>: str, <a href="#StrokeWidth"><i>stroke_width</i></a>: str, <a href="#CharWidth"><i>char_width</i></a>: Sequence[int], <a href="#CharHeight"><i>char_height</i></a>: Sequence[int], <a href="#ThresholdOffset"><i>threshold_offset</i></a>: int, <a href="#Contrast"><i>contrast</i></a>: int) -&gt; Tuple[HObject, HObject, Sequence[int]]</code></p>
<p>
<code>def <b>segment_characters_s</b>(<a href="#Region"><i>区域</i></a>: HObject, <a href="#Image"><i>image</i></a>: HObject, <a href="#Method"><i>method</i></a>: str, <a href="#EliminateLines"><i>eliminate_lines</i></a>: str, <a href="#DotPrint"><i>dot_print</i></a>: str, <a href="#StrokeWidth"><i>stroke_width</i></a>: str, <a href="#CharWidth"><i>char_width</i></a>: Sequence[int], <a href="#CharHeight"><i>char_height</i></a>: Sequence[int], <a href="#ThresholdOffset"><i>threshold_offset</i></a>: int, <a href="#Contrast"><i>contrast</i></a>: int) -&gt; Tuple[HObject, HObject, int]</code></p>
</div>
<h2 id="sec_description">描述</h2>
<p>This operator is used to segment characters in a given <a href="#Region"><i><code><span data-if="hdevelop" style="display:inline">区域</span><span data-if="c" style="display:none">区域</span><span data-if="cpp" style="display:none">区域</span><span data-if="com" style="display:none">区域</span><span data-if="dotnet" style="display:none">区域</span><span data-if="python" style="display:none">区域</span></code></i></a> of an
<a href="#Image"><i><code><span data-if="hdevelop" style="display:inline">Image</span><span data-if="c" style="display:none">Image</span><span data-if="cpp" style="display:none">Image</span><span data-if="com" style="display:none">Image</span><span data-if="dotnet" style="display:none">image</span><span data-if="python" style="display:none">image</span></code></i></a>. The <a href="#Region"><i><code><span data-if="hdevelop" style="display:inline">区域</span><span data-if="c" style="display:none">区域</span><span data-if="cpp" style="display:none">区域</span><span data-if="com" style="display:none">区域</span><span data-if="dotnet" style="display:none">区域</span><span data-if="python" style="display:none">区域</span></code></i></a> is only used to reduce the working area.
The segmented characters are returned in <a href="#RegionForeground"><i><code><span data-if="hdevelop" style="display:inline">RegionForeground</span><span data-if="c" style="display:none">RegionForeground</span><span data-if="cpp" style="display:none">RegionForeground</span><span data-if="com" style="display:none">RegionForeground</span><span data-if="dotnet" style="display:none">regionForeground</span><span data-if="python" style="display:none">region_foreground</span></code></i></a>.
</p>
<p>Two different methods to detect the characters are supplied.
All segmentation methods assume that the text is darker than the
background. If this is not the case, please invert the image with
<a href="invert_image.html"><code><span data-if="hdevelop" style="display:inline">invert_image</span><span data-if="c" style="display:none">invert_image</span><span data-if="cpp" style="display:none">InvertImage</span><span data-if="com" style="display:none">InvertImage</span><span data-if="dotnet" style="display:none">InvertImage</span><span data-if="python" style="display:none">invert_image</span></code></a>.
</p>
<p>The parameter <a href="#Method"><i><code><span data-if="hdevelop" style="display:inline">Method</span><span data-if="c" style="display:none">Method</span><span data-if="cpp" style="display:none">Method</span><span data-if="com" style="display:none">Method</span><span data-if="dotnet" style="display:none">method</span><span data-if="python" style="display:none">method</span></code></i></a> determines the algorithm for text
segmentation. The possible values are
</p>
<dl class="generic">

<dt><b>'local_contrast_best'</b></dt>
<dd>
<p>

This method extracts text that differ locally from the
background. Therefore, it is suited for images with
inhomogeneous illumination. The enhancement of the text
borders, leads  to a more accurate determination of the
outline of the text. Which is especially useful if the
background is highly textured. The parameter
<a href="#Contrast"><i><code><span data-if="hdevelop" style="display:inline">Contrast</span><span data-if="c" style="display:none">Contrast</span><span data-if="cpp" style="display:none">Contrast</span><span data-if="com" style="display:none">Contrast</span><span data-if="dotnet" style="display:none">contrast</span><span data-if="python" style="display:none">contrast</span></code></i></a> defines the minimum contrast,i.e.,
the minimum gray value difference between symbols and
background.
</p>
</dd>

<dt><b>'local_auto_shape'</b></dt>
<dd>
<p>

The minimum contrast is estimated automatically   such
that the number of very small regions is reduced. This
method is especially suitable for noisy  images.  The
parameter <a href="#ThresholdOffset"><i><code><span data-if="hdevelop" style="display:inline">ThresholdOffset</span><span data-if="c" style="display:none">ThresholdOffset</span><span data-if="cpp" style="display:none">ThresholdOffset</span><span data-if="com" style="display:none">ThresholdOffset</span><span data-if="dotnet" style="display:none">thresholdOffset</span><span data-if="python" style="display:none">threshold_offset</span></code></i></a> can be used to adjust
the threshold.
Let g(x,y) be the gray value at position (x,y) in the
input <a href="#Image"><i><code><span data-if="hdevelop" style="display:inline">Image</span><span data-if="c" style="display:none">Image</span><span data-if="cpp" style="display:none">Image</span><span data-if="com" style="display:none">Image</span><span data-if="dotnet" style="display:none">image</span><span data-if="python" style="display:none">image</span></code></i></a>. The threshold condition is
determined by:
</p>
<p><span title="1" class="displaymath"><!-- Created by MetaPost 1.902 on 2023.05.15:2033 --><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="22.2305em" height="1.12127em" viewBox="0 0 355.687744 17.940399">
<!-- Original BoundingBox: -177.843872 -8.970200 177.843872 8.970200 -->
  <defs>
    <g transform="scale(0.009963,0.009963)" id="GLYPHpcrr8r_79">
      <path style="fill-rule: evenodd;" d="M300.000000 -576.000000C161.000000 -576.000000,51.000000 -445.000000,51.000000 -280.000000C51.000000 -115.000000,161.000000 16.000000,300.000000 16.000000C437.000000 16.000000,549.000000 -115.000000,549.000000 -276.000000C549.000000 -446.000000,441.000000 -576.000000,300.000000 -576.000000M300.000000 -535.000000C416.000000 -535.000000,508.000000 -421.000000,508.000000 -277.000000C508.000000 -140.000000,413.000000 -25.000000,300.000000 -25.000000C186.000000 -25.000000,92.000000 -140.000000,92.000000 -280.000000C92.000000 -420.000000,185.000000 -535.000000,300.000000 -535.000000"></path>
    </g>
    <g transform="scale(0.009963,0.009963)" id="GLYPHpcrr8r_84">
      <path style="fill-rule: evenodd;" d="M321.000000 -41.000000L321.000000 -522.000000L487.000000 -522.000000L487.000000 -449.000000C487.000000 -433.000000,496.000000 -422.000000,508.000000 -422.000000C522.000000 -422.000000,528.000000 -430.000000,528.000000 -449.000000L528.000000 -563.000000L72.000000 -563.000000L72.000000 -449.000000C72.000000 -431.000000,79.000000 -422.000000,92.000000 -422.000000C106.000000 -422.000000,113.000000 -431.000000,113.000000 -449.000000L113.000000 -522.000000L280.000000 -522.000000L280.000000 -41.000000L175.000000 -41.000000C157.000000 -41.000000,148.000000 -34.000000,148.000000 -21.000000C148.000000 -7.000000,157.000000 -0.000000,175.000000 -0.000000L426.000000 -0.000000C444.000000 -0.000000,453.000000 -7.000000,453.000000 -21.000000C453.000000 -34.000000,444.000000 -41.000000,426.000000 -41.000000"></path>
    </g>
    <g transform="scale(0.009963,0.009963)" id="GLYPHpcrr8r_85">
      <path style="fill-rule: evenodd;" d="M499.000000 -522.000000L533.000000 -522.000000C551.000000 -522.000000,560.000000 -529.000000,560.000000 -543.000000C560.000000 -557.000000,552.000000 -563.000000,533.000000 -563.000000L384.000000 -563.000000C365.000000 -563.000000,357.000000 -557.000000,357.000000 -543.000000C357.000000 -529.000000,366.000000 -522.000000,384.000000 -522.000000L458.000000 -522.000000L458.000000 -185.000000C458.000000 -95.000000,388.000000 -25.000000,300.000000 -25.000000C211.000000 -25.000000,142.000000 -95.000000,142.000000 -185.000000L142.000000 -522.000000L216.000000 -522.000000C234.000000 -522.000000,243.000000 -529.000000,243.000000 -543.000000C243.000000 -556.000000,234.000000 -563.000000,216.000000 -563.000000L67.000000 -563.000000C49.000000 -563.000000,40.000000 -557.000000,40.000000 -543.000000C40.000000 -529.000000,49.000000 -522.000000,67.000000 -522.000000L101.000000 -522.000000L101.000000 -185.000000C101.000000 -71.000000,187.000000 16.000000,300.000000 16.000000C412.000000 16.000000,499.000000 -71.000000,499.000000 -185.000000"></path>
    </g>
    <g transform="scale(0.009963,0.009963)" id="GLYPHpcrr8r_100">
      <path style="fill-rule: evenodd;" d="M502.000000 -604.000000L407.000000 -604.000000C389.000000 -604.000000,380.000000 -597.000000,380.000000 -584.000000C380.000000 -570.000000,389.000000 -563.000000,407.000000 -563.000000L461.000000 -563.000000L461.000000 -327.000000C412.000000 -398.000000,354.000000 -431.000000,279.000000 -431.000000C160.000000 -431.000000,63.000000 -331.000000,63.000000 -208.000000C63.000000 -85.000000,160.000000 16.000000,279.000000 16.000000C354.000000 16.000000,414.000000 -19.000000,461.000000 -89.000000L461.000000 -0.000000L556.000000 -0.000000C574.000000 -0.000000,583.000000 -7.000000,583.000000 -21.000000C583.000000 -34.000000,574.000000 -41.000000,556.000000 -41.000000L502.000000 -41.000000M282.000000 -390.000000C383.000000 -390.000000,461.000000 -310.000000,461.000000 -206.000000C461.000000 -106.000000,381.000000 -25.000000,283.000000 -25.000000C183.000000 -25.000000,104.000000 -106.000000,104.000000 -208.000000C104.000000 -309.000000,183.000000 -390.000000,282.000000 -390.000000"></path>
    </g>
    <g transform="scale(0.009963,0.009963)" id="GLYPHpcrr8r_101">
      <path style="fill-rule: evenodd;" d="M520.000000 -199.000000C520.000000 -245.000000,517.000000 -264.000000,503.000000 -297.000000C467.000000 -380.000000,387.000000 -431.000000,291.000000 -431.000000C163.000000 -431.000000,63.000000 -338.000000,63.000000 -217.000000C63.000000 -87.000000,170.000000 16.000000,305.000000 16.000000C396.000000 16.000000,516.000000 -31.000000,516.000000 -66.000000C516.000000 -77.000000,507.000000 -86.000000,497.000000 -86.000000C492.000000 -86.000000,488.000000 -84.000000,481.000000 -79.000000C441.000000 -47.000000,368.000000 -25.000000,306.000000 -25.000000C198.000000 -25.000000,118.000000 -94.000000,104.000000 -199.000000M104.000000 -240.000000C122.000000 -332.000000,194.000000 -390.000000,291.000000 -390.000000C388.000000 -390.000000,462.000000 -331.000000,478.000000 -240.000000"></path>
    </g>
    <g transform="scale(0.009963,0.009963)" id="GLYPHpcrr8r_102">
      <path style="fill-rule: evenodd;" d="M271.000000 -376.000000L460.000000 -376.000000C478.000000 -376.000000,487.000000 -383.000000,487.000000 -397.000000C487.000000 -410.000000,478.000000 -417.000000,460.000000 -417.000000L271.000000 -417.000000L271.000000 -478.000000C271.000000 -528.000000,316.000000 -563.000000,382.000000 -563.000000C404.000000 -563.000000,443.000000 -560.000000,470.000000 -557.000000C518.000000 -551.000000,518.000000 -551.000000,520.000000 -551.000000C532.000000 -551.000000,541.000000 -559.000000,541.000000 -571.000000C541.000000 -581.000000,535.000000 -588.000000,523.000000 -591.000000C491.000000 -597.000000,422.000000 -604.000000,384.000000 -604.000000C294.000000 -604.000000,230.000000 -551.000000,230.000000 -478.000000L230.000000 -417.000000L142.000000 -417.000000C124.000000 -417.000000,115.000000 -410.000000,115.000000 -397.000000C115.000000 -383.000000,124.000000 -376.000000,142.000000 -376.000000L230.000000 -376.000000L230.000000 -41.000000L132.000000 -41.000000C114.000000 -41.000000,105.000000 -34.000000,105.000000 -21.000000C105.000000 -7.000000,114.000000 -0.000000,132.000000 -0.000000L449.000000 -0.000000C466.000000 -0.000000,476.000000 -7.000000,476.000000 -21.000000C476.000000 -34.000000,467.000000 -41.000000,449.000000 -41.000000L271.000000 -41.000000"></path>
    </g>
    <g transform="scale(0.009963,0.009963)" id="GLYPHpcrr8r_104">
      <path style="fill-rule: evenodd;" d="M165.000000 -604.000000L70.000000 -604.000000C52.000000 -604.000000,43.000000 -597.000000,43.000000 -584.000000C43.000000 -570.000000,52.000000 -563.000000,70.000000 -563.000000L124.000000 -563.000000L124.000000 -41.000000L78.000000 -41.000000C60.000000 -41.000000,51.000000 -34.000000,51.000000 -21.000000C51.000000 -7.000000,61.000000 -0.000000,78.000000 -0.000000L210.000000 -0.000000C228.000000 -0.000000,238.000000 -7.000000,238.000000 -21.000000C238.000000 -34.000000,229.000000 -41.000000,210.000000 -41.000000L165.000000 -41.000000L165.000000 -296.000000L176.000000 -309.000000C230.000000 -373.000000,258.000000 -390.000000,314.000000 -390.000000C354.000000 -390.000000,376.000000 -383.000000,399.000000 -364.000000C424.000000 -344.000000,437.000000 -318.000000,437.000000 -288.000000L437.000000 -41.000000L392.000000 -41.000000C374.000000 -41.000000,365.000000 -34.000000,365.000000 -21.000000C365.000000 -7.000000,374.000000 -0.000000,392.000000 -0.000000L523.000000 -0.000000C542.000000 -0.000000,551.000000 -7.000000,551.000000 -21.000000C551.000000 -34.000000,542.000000 -41.000000,523.000000 -41.000000L478.000000 -41.000000L478.000000 -291.000000C478.000000 -372.000000,412.000000 -431.000000,319.000000 -431.000000C258.000000 -431.000000,216.000000 -408.000000,165.000000 -347.000000"></path>
    </g>
    <g transform="scale(0.009963,0.009963)" id="GLYPHpcrr8r_108">
      <path style="fill-rule: evenodd;" d="M320.000000 -604.000000L162.000000 -604.000000C144.000000 -604.000000,135.000000 -597.000000,135.000000 -584.000000C135.000000 -570.000000,144.000000 -563.000000,162.000000 -563.000000L279.000000 -563.000000L279.000000 -41.000000L119.000000 -41.000000C101.000000 -41.000000,92.000000 -34.000000,92.000000 -21.000000C92.000000 -7.000000,101.000000 -0.000000,119.000000 -0.000000L480.000000 -0.000000C498.000000 -0.000000,508.000000 -7.000000,508.000000 -21.000000C508.000000 -34.000000,499.000000 -41.000000,480.000000 -41.000000L320.000000 -41.000000"></path>
    </g>
    <g transform="scale(0.009963,0.009963)" id="GLYPHpcrr8r_111">
      <path style="fill-rule: evenodd;" d="M300.000000 -431.000000C173.000000 -431.000000,72.000000 -331.000000,72.000000 -208.000000C72.000000 -83.000000,173.000000 16.000000,300.000000 16.000000C426.000000 16.000000,528.000000 -83.000000,528.000000 -205.000000C528.000000 -332.000000,428.000000 -431.000000,300.000000 -431.000000M300.000000 -390.000000C405.000000 -390.000000,487.000000 -310.000000,487.000000 -205.000000C487.000000 -106.000000,403.000000 -25.000000,300.000000 -25.000000C196.000000 -25.000000,113.000000 -106.000000,113.000000 -208.000000C113.000000 -309.000000,196.000000 -390.000000,300.000000 -390.000000"></path>
    </g>
    <g transform="scale(0.009963,0.009963)" id="GLYPHpcrr8r_114">
      <path style="fill-rule: evenodd;" d="M248.000000 -417.000000L132.000000 -417.000000C115.000000 -417.000000,105.000000 -409.000000,105.000000 -397.000000C105.000000 -384.000000,115.000000 -376.000000,132.000000 -376.000000L207.000000 -376.000000L207.000000 -41.000000L111.000000 -41.000000C94.000000 -41.000000,84.000000 -33.000000,84.000000 -21.000000C84.000000 -8.000000,94.000000 -0.000000,111.000000 -0.000000L427.000000 -0.000000C444.000000 -0.000000,454.000000 -8.000000,454.000000 -20.000000C454.000000 -33.000000,444.000000 -41.000000,427.000000 -41.000000L248.000000 -41.000000L248.000000 -262.000000C358.000000 -363.000000,393.000000 -386.000000,438.000000 -386.000000C460.000000 -386.000000,480.000000 -375.000000,504.000000 -352.000000C511.000000 -345.000000,513.000000 -344.000000,520.000000 -344.000000C532.000000 -344.000000,541.000000 -353.000000,541.000000 -365.000000C541.000000 -374.000000,535.000000 -382.000000,518.000000 -396.000000C492.000000 -418.000000,470.000000 -427.000000,441.000000 -427.000000C390.000000 -427.000000,341.000000 -399.000000,248.000000 -315.000000"></path>
    </g>
    <g transform="scale(0.009963,0.009963)" id="GLYPHpcrr8r_115">
      <path style="fill-rule: evenodd;" d="M432.000000 -385.000000C397.000000 -416.000000,352.000000 -431.000000,295.000000 -431.000000C197.000000 -431.000000,124.000000 -383.000000,124.000000 -318.000000C124.000000 -287.000000,142.000000 -257.000000,170.000000 -239.000000C198.000000 -222.000000,226.000000 -215.000000,300.000000 -207.000000C355.000000 -201.000000,382.000000 -194.000000,408.000000 -180.000000C435.000000 -165.000000,452.000000 -140.000000,452.000000 -117.000000C452.000000 -64.000000,386.000000 -25.000000,298.000000 -25.000000C213.000000 -25.000000,144.000000 -62.000000,144.000000 -108.000000L144.000000 -115.000000C144.000000 -128.000000,136.000000 -137.000000,124.000000 -137.000000C110.000000 -137.000000,103.000000 -128.000000,103.000000 -110.000000L103.000000 -27.000000C103.000000 -9.000000,110.000000 -0.000000,124.000000 -0.000000C137.000000 -0.000000,144.000000 -9.000000,144.000000 -27.000000L144.000000 -38.000000C186.000000 -1.000000,236.000000 16.000000,301.000000 16.000000C414.000000 16.000000,497.000000 -40.000000,497.000000 -116.000000C497.000000 -151.000000,478.000000 -185.000000,447.000000 -206.000000C415.000000 -227.000000,378.000000 -238.000000,317.000000 -245.000000C229.000000 -254.000000,223.000000 -256.000000,201.000000 -270.000000C180.000000 -282.000000,169.000000 -299.000000,169.000000 -315.000000C169.000000 -358.000000,225.000000 -390.000000,299.000000 -390.000000C375.000000 -390.000000,427.000000 -361.000000,432.000000 -316.000000C434.000000 -300.000000,441.000000 -293.000000,453.000000 -293.000000C466.000000 -293.000000,473.000000 -302.000000,473.000000 -320.000000L473.000000 -389.000000C473.000000 -408.000000,466.000000 -417.000000,453.000000 -417.000000C440.000000 -417.000000,432.000000 -406.000000,432.000000 -389.000000"></path>
    </g>
    <g transform="scale(0.009963,0.009963)" id="GLYPHpcrr8r_116">
      <path style="fill-rule: evenodd;" d="M186.000000 -417.000000L186.000000 -536.000000C186.000000 -555.000000,180.000000 -563.000000,166.000000 -563.000000C152.000000 -563.000000,145.000000 -554.000000,145.000000 -536.000000L145.000000 -417.000000L71.000000 -417.000000C52.000000 -417.000000,43.000000 -410.000000,43.000000 -397.000000C43.000000 -383.000000,52.000000 -376.000000,71.000000 -376.000000L145.000000 -376.000000L145.000000 -107.000000C145.000000 -32.000000,206.000000 16.000000,300.000000 16.000000C385.000000 16.000000,499.000000 -22.000000,499.000000 -51.000000C499.000000 -61.000000,490.000000 -71.000000,480.000000 -71.000000C475.000000 -71.000000,472.000000 -70.000000,464.000000 -65.000000C425.000000 -42.000000,354.000000 -25.000000,298.000000 -25.000000C229.000000 -25.000000,186.000000 -58.000000,186.000000 -109.000000L186.000000 -376.000000L406.000000 -376.000000C424.000000 -376.000000,433.000000 -383.000000,433.000000 -397.000000C433.000000 -410.000000,424.000000 -417.000000,406.000000 -417.000000"></path>
    </g>
    <g transform="scale(0.009963,0.009963)" id="GLYPHcmr10_40">
      <path style="fill-rule: evenodd;" d="M331.000000 240.000000C331.000000 237.000000,331.000000 235.000000,314.000000 218.000000C189.000000 92.000000,157.000000 -97.000000,157.000000 -250.000000C157.000000 -424.000000,195.000000 -598.000000,318.000000 -723.000000C331.000000 -735.000000,331.000000 -737.000000,331.000000 -740.000000C331.000000 -747.000000,327.000000 -750.000000,321.000000 -750.000000C311.000000 -750.000000,221.000000 -682.000000,162.000000 -555.000000C111.000000 -445.000000,99.000000 -334.000000,99.000000 -250.000000C99.000000 -172.000000,110.000000 -51.000000,165.000000 62.000000C225.000000 185.000000,311.000000 250.000000,321.000000 250.000000C327.000000 250.000000,331.000000 247.000000,331.000000 240.000000"></path>
    </g>
    <g transform="scale(0.009963,0.009963)" id="GLYPHcmr10_41">
      <path style="fill-rule: evenodd;" d="M289.000000 -250.000000C289.000000 -328.000000,278.000000 -449.000000,223.000000 -562.000000C163.000000 -685.000000,77.000000 -750.000000,67.000000 -750.000000C61.000000 -750.000000,57.000000 -746.000000,57.000000 -740.000000C57.000000 -737.000000,57.000000 -735.000000,76.000000 -717.000000C174.000000 -618.000000,231.000000 -459.000000,231.000000 -250.000000C231.000000 -79.000000,194.000000 97.000000,70.000000 223.000000C57.000000 235.000000,57.000000 237.000000,57.000000 240.000000C57.000000 246.000000,61.000000 250.000000,67.000000 250.000000C77.000000 250.000000,167.000000 182.000000,226.000000 55.000000C277.000000 -55.000000,289.000000 -166.000000,289.000000 -250.000000"></path>
    </g>
    <g transform="scale(0.009963,0.009963)" id="GLYPHcmr10_43">
      <path style="fill-rule: evenodd;" d="M409.000000 -230.000000L688.000000 -230.000000C702.000000 -230.000000,721.000000 -230.000000,721.000000 -250.000000C721.000000 -270.000000,702.000000 -270.000000,688.000000 -270.000000L409.000000 -270.000000L409.000000 -550.000000C409.000000 -564.000000,409.000000 -583.000000,389.000000 -583.000000C369.000000 -583.000000,369.000000 -564.000000,369.000000 -550.000000L369.000000 -270.000000L89.000000 -270.000000C75.000000 -270.000000,56.000000 -270.000000,56.000000 -250.000000C56.000000 -230.000000,75.000000 -230.000000,89.000000 -230.000000L369.000000 -230.000000L369.000000 50.000000C369.000000 64.000000,369.000000 83.000000,389.000000 83.000000C409.000000 83.000000,409.000000 64.000000,409.000000 50.000000"></path>
    </g>
    <g transform="scale(0.009963,0.009963)" id="GLYPHcmsy10_20">
      <path style="fill-rule: evenodd;" d="M675.000000 -594.000000C686.000000 -599.000000,694.000000 -604.000000,694.000000 -616.000000C694.000000 -627.000000,686.000000 -636.000000,674.000000 -636.000000C669.000000 -636.000000,660.000000 -632.000000,656.000000 -630.000000L103.000000 -369.000000C86.000000 -361.000000,83.000000 -354.000000,83.000000 -346.000000C83.000000 -337.000000,89.000000 -330.000000,103.000000 -324.000000L656.000000 -64.000000C669.000000 -57.000000,671.000000 -57.000000,674.000000 -57.000000C685.000000 -57.000000,694.000000 -66.000000,694.000000 -77.000000C694.000000 -86.000000,690.000000 -92.000000,673.000000 -100.000000L150.000000 -346.000000M659.000000 137.000000C676.000000 137.000000,694.000000 137.000000,694.000000 117.000000C694.000000 97.000000,673.000000 97.000000,658.000000 97.000000L119.000000 97.000000C104.000000 97.000000,83.000000 97.000000,83.000000 117.000000C83.000000 137.000000,101.000000 137.000000,118.000000 137.000000"></path>
    </g>
    <g transform="scale(0.009963,0.009963)" id="GLYPHcmmi10_59">
      <path style="fill-rule: evenodd;" d="M203.000000 -1.000000C203.000000 -67.000000,178.000000 -106.000000,139.000000 -106.000000C106.000000 -106.000000,86.000000 -81.000000,86.000000 -53.000000C86.000000 -26.000000,106.000000 -0.000000,139.000000 -0.000000C151.000000 -0.000000,164.000000 -4.000000,174.000000 -13.000000C177.000000 -15.000000,178.000000 -16.000000,179.000000 -16.000000C180.000000 -16.000000,181.000000 -15.000000,181.000000 -1.000000C181.000000 73.000000,146.000000 133.000000,113.000000 166.000000C102.000000 177.000000,102.000000 179.000000,102.000000 182.000000C102.000000 189.000000,107.000000 193.000000,112.000000 193.000000C123.000000 193.000000,203.000000 116.000000,203.000000 -1.000000"></path>
    </g>
    <g transform="scale(0.009963,0.009963)" id="GLYPHcmmi10_103">
      <path style="fill-rule: evenodd;" d="M471.000000 -377.000000C472.000000 -383.000000,474.000000 -388.000000,474.000000 -395.000000C474.000000 -412.000000,462.000000 -422.000000,445.000000 -422.000000C435.000000 -422.000000,408.000000 -415.000000,404.000000 -379.000000C386.000000 -416.000000,351.000000 -442.000000,311.000000 -442.000000C197.000000 -442.000000,73.000000 -302.000000,73.000000 -158.000000C73.000000 -59.000000,134.000000 -0.000000,206.000000 -0.000000C265.000000 -0.000000,312.000000 -47.000000,322.000000 -58.000000L323.000000 -57.000000C302.000000 32.000000,290.000000 73.000000,290.000000 75.000000C286.000000 84.000000,252.000000 183.000000,146.000000 183.000000C127.000000 183.000000,94.000000 182.000000,66.000000 173.000000C96.000000 164.000000,107.000000 138.000000,107.000000 121.000000C107.000000 105.000000,96.000000 86.000000,69.000000 86.000000C47.000000 86.000000,15.000000 104.000000,15.000000 144.000000C15.000000 185.000000,52.000000 205.000000,148.000000 205.000000C273.000000 205.000000,345.000000 127.000000,360.000000 67.000000M341.000000 -128.000000C335.000000 -102.000000,312.000000 -77.000000,290.000000 -58.000000C269.000000 -40.000000,238.000000 -22.000000,209.000000 -22.000000C159.000000 -22.000000,144.000000 -74.000000,144.000000 -114.000000C144.000000 -162.000000,173.000000 -280.000000,200.000000 -331.000000C227.000000 -380.000000,270.000000 -420.000000,312.000000 -420.000000C378.000000 -420.000000,392.000000 -339.000000,392.000000 -334.000000C392.000000 -329.000000,390.000000 -323.000000,389.000000 -319.000000"></path>
    </g>
    <g transform="scale(0.009963,0.009963)" id="GLYPHcmmi10_120">
      <path style="fill-rule: evenodd;" d="M334.000000 -302.000000C340.000000 -328.000000,363.000000 -420.000000,433.000000 -420.000000C438.000000 -420.000000,462.000000 -420.000000,483.000000 -407.000000C455.000000 -402.000000,435.000000 -377.000000,435.000000 -353.000000C435.000000 -337.000000,446.000000 -318.000000,473.000000 -318.000000C495.000000 -318.000000,527.000000 -336.000000,527.000000 -376.000000C527.000000 -428.000000,468.000000 -442.000000,434.000000 -442.000000C376.000000 -442.000000,341.000000 -389.000000,329.000000 -366.000000C304.000000 -432.000000,250.000000 -442.000000,221.000000 -442.000000C117.000000 -442.000000,60.000000 -313.000000,60.000000 -288.000000C60.000000 -278.000000,70.000000 -278.000000,72.000000 -278.000000C80.000000 -278.000000,83.000000 -280.000000,85.000000 -289.000000C119.000000 -395.000000,185.000000 -420.000000,219.000000 -420.000000C238.000000 -420.000000,273.000000 -411.000000,273.000000 -353.000000C273.000000 -322.000000,256.000000 -255.000000,219.000000 -115.000000C203.000000 -53.000000,168.000000 -11.000000,124.000000 -11.000000C118.000000 -11.000000,95.000000 -11.000000,74.000000 -24.000000C99.000000 -29.000000,121.000000 -50.000000,121.000000 -78.000000C121.000000 -105.000000,99.000000 -113.000000,84.000000 -113.000000C54.000000 -113.000000,29.000000 -87.000000,29.000000 -55.000000C29.000000 -9.000000,79.000000 11.000000,123.000000 11.000000C189.000000 11.000000,225.000000 -59.000000,228.000000 -65.000000C240.000000 -28.000000,276.000000 11.000000,336.000000 11.000000C439.000000 11.000000,496.000000 -118.000000,496.000000 -143.000000C496.000000 -153.000000,487.000000 -153.000000,484.000000 -153.000000C475.000000 -153.000000,473.000000 -149.000000,471.000000 -142.000000C438.000000 -35.000000,370.000000 -11.000000,338.000000 -11.000000C299.000000 -11.000000,283.000000 -43.000000,283.000000 -77.000000C283.000000 -99.000000,289.000000 -121.000000,300.000000 -165.000000"></path>
    </g>
    <g transform="scale(0.009963,0.009963)" id="GLYPHcmmi10_121">
      <path style="fill-rule: evenodd;" d="M486.000000 -381.000000C490.000000 -395.000000,490.000000 -397.000000,490.000000 -404.000000C490.000000 -422.000000,476.000000 -431.000000,461.000000 -431.000000C451.000000 -431.000000,435.000000 -425.000000,426.000000 -410.000000C424.000000 -405.000000,416.000000 -374.000000,412.000000 -356.000000C405.000000 -330.000000,398.000000 -303.000000,392.000000 -276.000000L347.000000 -96.000000C343.000000 -81.000000,300.000000 -11.000000,234.000000 -11.000000C183.000000 -11.000000,172.000000 -55.000000,172.000000 -92.000000C172.000000 -138.000000,189.000000 -200.000000,223.000000 -288.000000C239.000000 -329.000000,243.000000 -340.000000,243.000000 -360.000000C243.000000 -405.000000,211.000000 -442.000000,161.000000 -442.000000C66.000000 -442.000000,29.000000 -297.000000,29.000000 -288.000000C29.000000 -278.000000,39.000000 -278.000000,41.000000 -278.000000C51.000000 -278.000000,52.000000 -280.000000,57.000000 -296.000000C84.000000 -390.000000,124.000000 -420.000000,158.000000 -420.000000C166.000000 -420.000000,183.000000 -420.000000,183.000000 -388.000000C183.000000 -363.000000,173.000000 -337.000000,166.000000 -318.000000C126.000000 -212.000000,108.000000 -155.000000,108.000000 -108.000000C108.000000 -19.000000,171.000000 11.000000,230.000000 11.000000C269.000000 11.000000,303.000000 -6.000000,331.000000 -34.000000C318.000000 18.000000,306.000000 67.000000,266.000000 120.000000C240.000000 154.000000,202.000000 183.000000,156.000000 183.000000C142.000000 183.000000,97.000000 180.000000,80.000000 141.000000C96.000000 141.000000,109.000000 141.000000,123.000000 129.000000C133.000000 120.000000,143.000000 107.000000,143.000000 88.000000C143.000000 57.000000,116.000000 53.000000,106.000000 53.000000C83.000000 53.000000,50.000000 69.000000,50.000000 118.000000C50.000000 168.000000,94.000000 205.000000,156.000000 205.000000C259.000000 205.000000,362.000000 114.000000,390.000000 1.000000"></path>
    </g>
  </defs>
  <g transform="matrix(1.600006,-0.000000,-0.000000,1.600006,0.156128 11.985046)" style="fill: rgb(0.000000%,0.000000%,0.000000%);">
    <use xlink:href="#GLYPHcmmi10_103"></use>
  </g>
  <g transform="matrix(1.600006,-0.000000,-0.000000,1.600006,8.331039 11.985046)" style="fill: rgb(0.000000%,0.000000%,0.000000%);">
    <use xlink:href="#GLYPHcmr10_40"></use>
  </g>
  <g transform="matrix(1.600006,-0.000000,-0.000000,1.600006,14.530106 11.985046)" style="fill: rgb(0.000000%,0.000000%,0.000000%);">
    <use xlink:href="#GLYPHcmmi10_120"></use>
    <use xlink:href="#GLYPHcmmi10_59" x="5.715379"></use>
  </g>
  <g transform="matrix(1.600006,-0.000000,-0.000000,1.600006,30.724869 11.985046)" style="fill: rgb(0.000000%,0.000000%,0.000000%);">
    <use xlink:href="#GLYPHcmmi10_121"></use>
  </g>
  <g transform="matrix(1.600006,-0.000000,-0.000000,1.600006,39.111969 11.985046)" style="fill: rgb(0.000000%,0.000000%,0.000000%);">
    <use xlink:href="#GLYPHcmr10_41"></use>
  </g>
  <g transform="matrix(1.600006,-0.000000,-0.000000,1.600006,49.738708 11.985046)" style="fill: rgb(0.000000%,0.000000%,0.000000%);">
    <use xlink:href="#GLYPHcmsy10_20"></use>
  </g>
  <g transform="matrix(1.600006,-0.000000,-0.000000,1.600006,66.564529 11.985046)" style="fill: rgb(0.000000%,0.000000%,0.000000%);">
    <use xlink:href="#GLYPHpcrr8r_85"></use>
    <use xlink:href="#GLYPHpcrr8r_115" x="6.000092"></use>
    <use xlink:href="#GLYPHpcrr8r_101" x="12.000185"></use>
    <use xlink:href="#GLYPHpcrr8r_100" x="18.000277"></use>
    <use xlink:href="#GLYPHpcrr8r_84" x="24.000369"></use>
    <use xlink:href="#GLYPHpcrr8r_104" x="30.000462"></use>
    <use xlink:href="#GLYPHpcrr8r_114" x="36.000554"></use>
    <use xlink:href="#GLYPHpcrr8r_101" x="42.000646"></use>
    <use xlink:href="#GLYPHpcrr8r_115" x="48.000739"></use>
    <use xlink:href="#GLYPHpcrr8r_104" x="54.000831"></use>
    <use xlink:href="#GLYPHpcrr8r_111" x="60.000923"></use>
    <use xlink:href="#GLYPHpcrr8r_108" x="66.001016"></use>
    <use xlink:href="#GLYPHpcrr8r_100" x="72.001108"></use>
  </g>
  <g transform="matrix(1.600006,-0.000000,-0.000000,1.600006,194.441025 11.985046)" style="fill: rgb(0.000000%,0.000000%,0.000000%);">
    <use xlink:href="#GLYPHcmr10_43"></use>
  </g>
  <g transform="matrix(1.600006,-0.000000,-0.000000,1.600006,210.381241 11.985046)" style="fill: rgb(0.000000%,0.000000%,0.000000%);">
    <use xlink:href="#GLYPHpcrr8r_84"></use>
    <use xlink:href="#GLYPHpcrr8r_104" x="6.000092"></use>
    <use xlink:href="#GLYPHpcrr8r_114" x="12.000185"></use>
    <use xlink:href="#GLYPHpcrr8r_101" x="18.000277"></use>
    <use xlink:href="#GLYPHpcrr8r_115" x="24.000369"></use>
    <use xlink:href="#GLYPHpcrr8r_104" x="30.000462"></use>
    <use xlink:href="#GLYPHpcrr8r_111" x="36.000554"></use>
    <use xlink:href="#GLYPHpcrr8r_108" x="42.000646"></use>
    <use xlink:href="#GLYPHpcrr8r_100" x="48.000739"></use>
    <use xlink:href="#GLYPHpcrr8r_79" x="54.000831"></use>
    <use xlink:href="#GLYPHpcrr8r_102" x="60.000923"></use>
    <use xlink:href="#GLYPHpcrr8r_102" x="66.001016"></use>
    <use xlink:href="#GLYPHpcrr8r_115" x="72.001108"></use>
    <use xlink:href="#GLYPHpcrr8r_101" x="78.001200"></use>
    <use xlink:href="#GLYPHpcrr8r_116" x="84.001293"></use>
  </g>
</svg></span>.
</p>
</dd>
</dl>
<p>Select <a href="#EliminateLines"><i><code><span data-if="hdevelop" style="display:inline">EliminateLines</span><span data-if="c" style="display:none">EliminateLines</span><span data-if="cpp" style="display:none">EliminateLines</span><span data-if="com" style="display:none">EliminateLines</span><span data-if="dotnet" style="display:none">eliminateLines</span><span data-if="python" style="display:none">eliminate_lines</span></code></i></a> if the extraction of characters is disturbed
by lines that are horizontal or vertical with respect to the lines of
text and set its value to <i><span data-if="hdevelop" style="display:inline">'true'</span><span data-if="c" style="display:none">"true"</span><span data-if="cpp" style="display:none">"true"</span><span data-if="com" style="display:none">"true"</span><span data-if="dotnet" style="display:none">"true"</span><span data-if="python" style="display:none">"true"</span></i>. The elimination is influenced by the
maximum of <a href="#CharWidth"><i><code><span data-if="hdevelop" style="display:inline">CharWidth</span><span data-if="c" style="display:none">CharWidth</span><span data-if="cpp" style="display:none">CharWidth</span><span data-if="com" style="display:none">CharWidth</span><span data-if="dotnet" style="display:none">charWidth</span><span data-if="python" style="display:none">char_width</span></code></i></a> and the maximum  of  <a href="#CharHeight"><i><code><span data-if="hdevelop" style="display:inline">CharHeight</span><span data-if="c" style="display:none">CharHeight</span><span data-if="cpp" style="display:none">CharHeight</span><span data-if="com" style="display:none">CharHeight</span><span data-if="dotnet" style="display:none">charHeight</span><span data-if="python" style="display:none">char_height</span></code></i></a>.
For further information see the description of these parameters.
</p>
<p><a href="#DotPrint"><i><code><span data-if="hdevelop" style="display:inline">DotPrint</span><span data-if="c" style="display:none">DotPrint</span><span data-if="cpp" style="display:none">DotPrint</span><span data-if="com" style="display:none">DotPrint</span><span data-if="dotnet" style="display:none">dotPrint</span><span data-if="python" style="display:none">dot_print</span></code></i></a>:
Should be set to <i><span data-if="hdevelop" style="display:inline">'true'</span><span data-if="c" style="display:none">"true"</span><span data-if="cpp" style="display:none">"true"</span><span data-if="com" style="display:none">"true"</span><span data-if="dotnet" style="display:none">"true"</span><span data-if="python" style="display:none">"true"</span></i> if dot prints should be read, else to
<i><span data-if="hdevelop" style="display:inline">'false'</span><span data-if="c" style="display:none">"false"</span><span data-if="cpp" style="display:none">"false"</span><span data-if="com" style="display:none">"false"</span><span data-if="dotnet" style="display:none">"false"</span><span data-if="python" style="display:none">"false"</span></i>.
</p>
<p><a href="#StrokeWidth"><i><code><span data-if="hdevelop" style="display:inline">StrokeWidth</span><span data-if="c" style="display:none">StrokeWidth</span><span data-if="cpp" style="display:none">StrokeWidth</span><span data-if="com" style="display:none">StrokeWidth</span><span data-if="dotnet" style="display:none">strokeWidth</span><span data-if="python" style="display:none">stroke_width</span></code></i></a>:
Specifies the stroke width of the text. It is used to calculate internally
used mask sizes to determine the characters. This mask sizes are also
influenced through the parameters <a href="#DotPrint"><i><code><span data-if="hdevelop" style="display:inline">DotPrint</span><span data-if="c" style="display:none">DotPrint</span><span data-if="cpp" style="display:none">DotPrint</span><span data-if="com" style="display:none">DotPrint</span><span data-if="dotnet" style="display:none">dotPrint</span><span data-if="python" style="display:none">dot_print</span></code></i></a>, the average
<a href="#CharWidth"><i><code><span data-if="hdevelop" style="display:inline">CharWidth</span><span data-if="c" style="display:none">CharWidth</span><span data-if="cpp" style="display:none">CharWidth</span><span data-if="com" style="display:none">CharWidth</span><span data-if="dotnet" style="display:none">charWidth</span><span data-if="python" style="display:none">char_width</span></code></i></a>, and the average <a href="#CharHeight"><i><code><span data-if="hdevelop" style="display:inline">CharHeight</span><span data-if="c" style="display:none">CharHeight</span><span data-if="cpp" style="display:none">CharHeight</span><span data-if="com" style="display:none">CharHeight</span><span data-if="dotnet" style="display:none">charHeight</span><span data-if="python" style="display:none">char_height</span></code></i></a>.
</p>
<p><a href="#CharWidth"><i><code><span data-if="hdevelop" style="display:inline">CharWidth</span><span data-if="c" style="display:none">CharWidth</span><span data-if="cpp" style="display:none">CharWidth</span><span data-if="com" style="display:none">CharWidth</span><span data-if="dotnet" style="display:none">charWidth</span><span data-if="python" style="display:none">char_width</span></code></i></a>:
This can be a tuple with up to three values. The first value is the
average width of a character.  The second is the minimum width of a
character and the third is the maximum width of a character.
If the minimum is not set or equal -1, 该算子 automatically sets
these value depending on the average <a href="#CharWidth"><i><code><span data-if="hdevelop" style="display:inline">CharWidth</span><span data-if="c" style="display:none">CharWidth</span><span data-if="cpp" style="display:none">CharWidth</span><span data-if="com" style="display:none">CharWidth</span><span data-if="dotnet" style="display:none">charWidth</span><span data-if="python" style="display:none">char_width</span></code></i></a>. The same is
the case if the maximum is not set. Some examples:
</p>
<p>[10]       sets the average character width to 10, the minimum and
maximum are calculated by 该算子.
</p>
<p>[10,-1,20] sets the average character width to 10, the minimum value is
calculated by the system, and the maximum is set to 20.
</p>
<p>[10,5,20]  sets the average character width to 10, the minimum to 5,
and the maximum to 20.
</p>
<p><a href="#CharHeight"><i><code><span data-if="hdevelop" style="display:inline">CharHeight</span><span data-if="c" style="display:none">CharHeight</span><span data-if="cpp" style="display:none">CharHeight</span><span data-if="com" style="display:none">CharHeight</span><span data-if="dotnet" style="display:none">charHeight</span><span data-if="python" style="display:none">char_height</span></code></i></a>:
This can be a tuple with up to three values. The first value is the
average height of a character. The second is the minimum height of a
character and the third is the maximum height of a character.
If the minimum is not set or equal -1, 该算子 automatically sets
these value depending on the average <a href="#CharHeight"><i><code><span data-if="hdevelop" style="display:inline">CharHeight</span><span data-if="c" style="display:none">CharHeight</span><span data-if="cpp" style="display:none">CharHeight</span><span data-if="com" style="display:none">CharHeight</span><span data-if="dotnet" style="display:none">charHeight</span><span data-if="python" style="display:none">char_height</span></code></i></a>. The same is
the case if the maximum is not set. Some examples:
</p>
<p>[10]       sets the average character height to 10, the minimum and
maximum are calculated by 该算子.
</p>
<p>[10,-1,20] sets the average character height to 10, the minimum value is
calculated by the system, and the maximum is set to 20.
</p>
<p>[10,5,20]  this sets the average character height to 10, the minimum to 5,
and the maximum to 20.
</p>
<p><a href="#ThresholdOffset"><i><code><span data-if="hdevelop" style="display:inline">ThresholdOffset</span><span data-if="c" style="display:none">ThresholdOffset</span><span data-if="cpp" style="display:none">ThresholdOffset</span><span data-if="com" style="display:none">ThresholdOffset</span><span data-if="dotnet" style="display:none">thresholdOffset</span><span data-if="python" style="display:none">threshold_offset</span></code></i></a>:
This parameter can be used to adjust the threshold, which is used when the
segmentation method <i><span data-if="hdevelop" style="display:inline">'local_auto_shape'</span><span data-if="c" style="display:none">"local_auto_shape"</span><span data-if="cpp" style="display:none">"local_auto_shape"</span><span data-if="com" style="display:none">"local_auto_shape"</span><span data-if="dotnet" style="display:none">"local_auto_shape"</span><span data-if="python" style="display:none">"local_auto_shape"</span></i> is chosen.
</p>
<p><a href="#Contrast"><i><code><span data-if="hdevelop" style="display:inline">Contrast</span><span data-if="c" style="display:none">Contrast</span><span data-if="cpp" style="display:none">Contrast</span><span data-if="com" style="display:none">Contrast</span><span data-if="dotnet" style="display:none">contrast</span><span data-if="python" style="display:none">contrast</span></code></i></a>:
Defines the minimum contrast between the text and the background. This
parameter is used if the segmentation method <i><span data-if="hdevelop" style="display:inline">'local_contrast_best'</span><span data-if="c" style="display:none">"local_contrast_best"</span><span data-if="cpp" style="display:none">"local_contrast_best"</span><span data-if="com" style="display:none">"local_contrast_best"</span><span data-if="dotnet" style="display:none">"local_contrast_best"</span><span data-if="python" style="display:none">"local_contrast_best"</span></i>
is selected.
</p>
<p><a href="#UsedThreshold"><i><code><span data-if="hdevelop" style="display:inline">UsedThreshold</span><span data-if="c" style="display:none">UsedThreshold</span><span data-if="cpp" style="display:none">UsedThreshold</span><span data-if="com" style="display:none">UsedThreshold</span><span data-if="dotnet" style="display:none">usedThreshold</span><span data-if="python" style="display:none">used_threshold</span></code></i></a>:
After the execution, this parameter returns the threshold used to
segment the characters.
</p>
<p><a href="#ImageForeground"><i><code><span data-if="hdevelop" style="display:inline">ImageForeground</span><span data-if="c" style="display:none">ImageForeground</span><span data-if="cpp" style="display:none">ImageForeground</span><span data-if="com" style="display:none">ImageForeground</span><span data-if="dotnet" style="display:none">imageForeground</span><span data-if="python" style="display:none">image_foreground</span></code></i></a> returns the image that was internally used for the
segmentation.
</p>
<h2 id="sec_execution">运行信息</h2>
<ul>
  <li>多线程类型:可重入(与非独占操作符并行运行)。</li>
<li>多线程作用域:全局(可以从任何线程调用)。</li>
  
    <li>在元组级别自动并行化。</li>
  
</ul>
<h2 id="sec_parameters">参数表</h2>
  <div class="par">
<div class="parhead">
<span id="Region" class="parname"><b><code><span data-if="hdevelop" style="display:inline">区域</span><span data-if="c" style="display:none">区域</span><span data-if="cpp" style="display:none">区域</span><span data-if="com" style="display:none">区域</span><span data-if="dotnet" style="display:none">区域</span><span data-if="python" style="display:none">区域</span></code></b> (input_object)  </span><span>region(-array) <code>→</code> <span data-if="hdevelop" style="display:inline">object</span><span data-if="dotnet" style="display:none"><a href="HRegion.html">HRegion</a></span><span data-if="python" style="display:none">HObject</span><span data-if="cpp" style="display:none"><a href="HRegion.html">HRegion</a></span><span data-if="c" style="display:none">Hobject</span></span>
</div>
<p class="pardesc">Area in the image where the text lines are located.</p>
</div>
  <div class="par">
<div class="parhead">
<span id="Image" class="parname"><b><code><span data-if="hdevelop" style="display:inline">Image</span><span data-if="c" style="display:none">Image</span><span data-if="cpp" style="display:none">Image</span><span data-if="com" style="display:none">Image</span><span data-if="dotnet" style="display:none">image</span><span data-if="python" style="display:none">image</span></code></b> (input_object)  </span><span>singlechannelimage <code>→</code> <span data-if="hdevelop" style="display:inline">object</span><span data-if="dotnet" style="display:none"><a href="HImage.html">HImage</a></span><span data-if="python" style="display:none">HObject</span><span data-if="cpp" style="display:none"><a href="HImage.html">HImage</a></span><span data-if="c" style="display:none">Hobject</span> (byte / uint2)</span>
</div>
<p class="pardesc">Input image.</p>
</div>
  <div class="par">
<div class="parhead">
<span id="ImageForeground" class="parname"><b><code><span data-if="hdevelop" style="display:inline">ImageForeground</span><span data-if="c" style="display:none">ImageForeground</span><span data-if="cpp" style="display:none">ImageForeground</span><span data-if="com" style="display:none">ImageForeground</span><span data-if="dotnet" style="display:none">imageForeground</span><span data-if="python" style="display:none">image_foreground</span></code></b> (output_object)  </span><span>image(-array) <code>→</code> <span data-if="hdevelop" style="display:inline">object</span><span data-if="dotnet" style="display:none"><a href="HImage.html">HImage</a></span><span data-if="python" style="display:none">HObject</span><span data-if="cpp" style="display:none"><a href="HImage.html">HImage</a></span><span data-if="c" style="display:none">Hobject *</span> (byte / uint2)</span>
</div>
<p class="pardesc">Image used for the segmentation.</p>
</div>
  <div class="par">
<div class="parhead">
<span id="RegionForeground" class="parname"><b><code><span data-if="hdevelop" style="display:inline">RegionForeground</span><span data-if="c" style="display:none">RegionForeground</span><span data-if="cpp" style="display:none">RegionForeground</span><span data-if="com" style="display:none">RegionForeground</span><span data-if="dotnet" style="display:none">regionForeground</span><span data-if="python" style="display:none">region_foreground</span></code></b> (output_object)  </span><span>singlechannelregion(-array) <code>→</code> <span data-if="hdevelop" style="display:inline">object</span><span data-if="dotnet" style="display:none"><a href="HRegion.html">HRegion</a></span><span data-if="python" style="display:none">HObject</span><span data-if="cpp" style="display:none"><a href="HRegion.html">HRegion</a></span><span data-if="c" style="display:none">Hobject *</span></span>
</div>
<p class="pardesc">Region of characters.</p>
</div>
  <div class="par">
<div class="parhead">
<span id="Method" class="parname"><b><code><span data-if="hdevelop" style="display:inline">Method</span><span data-if="c" style="display:none">Method</span><span data-if="cpp" style="display:none">Method</span><span data-if="com" style="display:none">Method</span><span data-if="dotnet" style="display:none">method</span><span data-if="python" style="display:none">method</span></code></b> (input_control)  </span><span>string <code>→</code> <span data-if="dotnet" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="python" style="display:none">str</span><span data-if="cpp" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="c" style="display:none">Htuple</span><span data-if="hdevelop" style="display:inline"> (string)</span><span data-if="dotnet" style="display:none"> (<i>string</i>)</span><span data-if="cpp" style="display:none"> (<i>HString</i>)</span><span data-if="c" style="display:none"> (<i>char*</i>)</span></span>
</div>
<p class="pardesc">Method to segment the characters.</p>
<p class="pardesc"><span class="parcat">Default:
      </span>
    <span data-if="hdevelop" style="display:inline">'local_auto_shape'</span>
    <span data-if="c" style="display:none">"local_auto_shape"</span>
    <span data-if="cpp" style="display:none">"local_auto_shape"</span>
    <span data-if="com" style="display:none">"local_auto_shape"</span>
    <span data-if="dotnet" style="display:none">"local_auto_shape"</span>
    <span data-if="python" style="display:none">"local_auto_shape"</span>
</p>
<p class="pardesc"><span class="parcat">List of values:
      </span><span data-if="hdevelop" style="display:inline">'local_auto_shape'</span><span data-if="c" style="display:none">"local_auto_shape"</span><span data-if="cpp" style="display:none">"local_auto_shape"</span><span data-if="com" style="display:none">"local_auto_shape"</span><span data-if="dotnet" style="display:none">"local_auto_shape"</span><span data-if="python" style="display:none">"local_auto_shape"</span>, <span data-if="hdevelop" style="display:inline">'local_contrast_best'</span><span data-if="c" style="display:none">"local_contrast_best"</span><span data-if="cpp" style="display:none">"local_contrast_best"</span><span data-if="com" style="display:none">"local_contrast_best"</span><span data-if="dotnet" style="display:none">"local_contrast_best"</span><span data-if="python" style="display:none">"local_contrast_best"</span></p>
</div>
  <div class="par">
<div class="parhead">
<span id="EliminateLines" class="parname"><b><code><span data-if="hdevelop" style="display:inline">EliminateLines</span><span data-if="c" style="display:none">EliminateLines</span><span data-if="cpp" style="display:none">EliminateLines</span><span data-if="com" style="display:none">EliminateLines</span><span data-if="dotnet" style="display:none">eliminateLines</span><span data-if="python" style="display:none">eliminate_lines</span></code></b> (input_control)  </span><span>string <code>→</code> <span data-if="dotnet" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="python" style="display:none">str</span><span data-if="cpp" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="c" style="display:none">Htuple</span><span data-if="hdevelop" style="display:inline"> (string)</span><span data-if="dotnet" style="display:none"> (<i>string</i>)</span><span data-if="cpp" style="display:none"> (<i>HString</i>)</span><span data-if="c" style="display:none"> (<i>char*</i>)</span></span>
</div>
<p class="pardesc">Eliminate horizontal and vertical lines?</p>
<p class="pardesc"><span class="parcat">Default:
      </span>
    <span data-if="hdevelop" style="display:inline">'false'</span>
    <span data-if="c" style="display:none">"false"</span>
    <span data-if="cpp" style="display:none">"false"</span>
    <span data-if="com" style="display:none">"false"</span>
    <span data-if="dotnet" style="display:none">"false"</span>
    <span data-if="python" style="display:none">"false"</span>
</p>
<p class="pardesc"><span class="parcat">List of values:
      </span><span data-if="hdevelop" style="display:inline">'false'</span><span data-if="c" style="display:none">"false"</span><span data-if="cpp" style="display:none">"false"</span><span data-if="com" style="display:none">"false"</span><span data-if="dotnet" style="display:none">"false"</span><span data-if="python" style="display:none">"false"</span>, <span data-if="hdevelop" style="display:inline">'true'</span><span data-if="c" style="display:none">"true"</span><span data-if="cpp" style="display:none">"true"</span><span data-if="com" style="display:none">"true"</span><span data-if="dotnet" style="display:none">"true"</span><span data-if="python" style="display:none">"true"</span></p>
</div>
  <div class="par">
<div class="parhead">
<span id="DotPrint" class="parname"><b><code><span data-if="hdevelop" style="display:inline">DotPrint</span><span data-if="c" style="display:none">DotPrint</span><span data-if="cpp" style="display:none">DotPrint</span><span data-if="com" style="display:none">DotPrint</span><span data-if="dotnet" style="display:none">dotPrint</span><span data-if="python" style="display:none">dot_print</span></code></b> (input_control)  </span><span>string <code>→</code> <span data-if="dotnet" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="python" style="display:none">str</span><span data-if="cpp" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="c" style="display:none">Htuple</span><span data-if="hdevelop" style="display:inline"> (string)</span><span data-if="dotnet" style="display:none"> (<i>string</i>)</span><span data-if="cpp" style="display:none"> (<i>HString</i>)</span><span data-if="c" style="display:none"> (<i>char*</i>)</span></span>
</div>
<p class="pardesc">Should dot print characters be detected?</p>
<p class="pardesc"><span class="parcat">Default:
      </span>
    <span data-if="hdevelop" style="display:inline">'false'</span>
    <span data-if="c" style="display:none">"false"</span>
    <span data-if="cpp" style="display:none">"false"</span>
    <span data-if="com" style="display:none">"false"</span>
    <span data-if="dotnet" style="display:none">"false"</span>
    <span data-if="python" style="display:none">"false"</span>
</p>
<p class="pardesc"><span class="parcat">List of values:
      </span><span data-if="hdevelop" style="display:inline">'false'</span><span data-if="c" style="display:none">"false"</span><span data-if="cpp" style="display:none">"false"</span><span data-if="com" style="display:none">"false"</span><span data-if="dotnet" style="display:none">"false"</span><span data-if="python" style="display:none">"false"</span>, <span data-if="hdevelop" style="display:inline">'true'</span><span data-if="c" style="display:none">"true"</span><span data-if="cpp" style="display:none">"true"</span><span data-if="com" style="display:none">"true"</span><span data-if="dotnet" style="display:none">"true"</span><span data-if="python" style="display:none">"true"</span></p>
</div>
  <div class="par">
<div class="parhead">
<span id="StrokeWidth" class="parname"><b><code><span data-if="hdevelop" style="display:inline">StrokeWidth</span><span data-if="c" style="display:none">StrokeWidth</span><span data-if="cpp" style="display:none">StrokeWidth</span><span data-if="com" style="display:none">StrokeWidth</span><span data-if="dotnet" style="display:none">strokeWidth</span><span data-if="python" style="display:none">stroke_width</span></code></b> (input_control)  </span><span>string <code>→</code> <span data-if="dotnet" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="python" style="display:none">str</span><span data-if="cpp" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="c" style="display:none">Htuple</span><span data-if="hdevelop" style="display:inline"> (string)</span><span data-if="dotnet" style="display:none"> (<i>string</i>)</span><span data-if="cpp" style="display:none"> (<i>HString</i>)</span><span data-if="c" style="display:none"> (<i>char*</i>)</span></span>
</div>
<p class="pardesc">Stroke width of a character.</p>
<p class="pardesc"><span class="parcat">Default:
      </span>
    <span data-if="hdevelop" style="display:inline">'medium'</span>
    <span data-if="c" style="display:none">"medium"</span>
    <span data-if="cpp" style="display:none">"medium"</span>
    <span data-if="com" style="display:none">"medium"</span>
    <span data-if="dotnet" style="display:none">"medium"</span>
    <span data-if="python" style="display:none">"medium"</span>
</p>
<p class="pardesc"><span class="parcat">List of values:
      </span><span data-if="hdevelop" style="display:inline">'bold'</span><span data-if="c" style="display:none">"bold"</span><span data-if="cpp" style="display:none">"bold"</span><span data-if="com" style="display:none">"bold"</span><span data-if="dotnet" style="display:none">"bold"</span><span data-if="python" style="display:none">"bold"</span>, <span data-if="hdevelop" style="display:inline">'light'</span><span data-if="c" style="display:none">"light"</span><span data-if="cpp" style="display:none">"light"</span><span data-if="com" style="display:none">"light"</span><span data-if="dotnet" style="display:none">"light"</span><span data-if="python" style="display:none">"light"</span>, <span data-if="hdevelop" style="display:inline">'medium'</span><span data-if="c" style="display:none">"medium"</span><span data-if="cpp" style="display:none">"medium"</span><span data-if="com" style="display:none">"medium"</span><span data-if="dotnet" style="display:none">"medium"</span><span data-if="python" style="display:none">"medium"</span>, <span data-if="hdevelop" style="display:inline">'ultra_light'</span><span data-if="c" style="display:none">"ultra_light"</span><span data-if="cpp" style="display:none">"ultra_light"</span><span data-if="com" style="display:none">"ultra_light"</span><span data-if="dotnet" style="display:none">"ultra_light"</span><span data-if="python" style="display:none">"ultra_light"</span></p>
</div>
  <div class="par">
<div class="parhead">
<span id="CharWidth" class="parname"><b><code><span data-if="hdevelop" style="display:inline">CharWidth</span><span data-if="c" style="display:none">CharWidth</span><span data-if="cpp" style="display:none">CharWidth</span><span data-if="com" style="display:none">CharWidth</span><span data-if="dotnet" style="display:none">charWidth</span><span data-if="python" style="display:none">char_width</span></code></b> (input_control)  </span><span>integer-array <code>→</code> <span data-if="dotnet" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="python" style="display:none">Sequence[int]</span><span data-if="cpp" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="c" style="display:none">Htuple</span><span data-if="hdevelop" style="display:inline"> (integer)</span><span data-if="dotnet" style="display:none"> (<i>int</i> / </span><span data-if="dotnet" style="display:none">long)</span><span data-if="cpp" style="display:none"> (<i>Hlong</i>)</span><span data-if="c" style="display:none"> (<i>Hlong</i>)</span></span>
</div>
<p class="pardesc">Width of a character.</p>
<p class="pardesc"><span class="parcat">Default:
      </span>25</p>
<p class="pardesc"><span class="parcat">Value range:
      </span><code>1
          ≤
        
    <span data-if="hdevelop" style="display:inline">CharWidth</span>
    <span data-if="c" style="display:none">CharWidth</span>
    <span data-if="cpp" style="display:none">CharWidth</span>
    <span data-if="com" style="display:none">CharWidth</span>
    <span data-if="dotnet" style="display:none">charWidth</span>
    <span data-if="python" style="display:none">char_width</span>
    </code></p>
</div>
  <div class="par">
<div class="parhead">
<span id="CharHeight" class="parname"><b><code><span data-if="hdevelop" style="display:inline">CharHeight</span><span data-if="c" style="display:none">CharHeight</span><span data-if="cpp" style="display:none">CharHeight</span><span data-if="com" style="display:none">CharHeight</span><span data-if="dotnet" style="display:none">charHeight</span><span data-if="python" style="display:none">char_height</span></code></b> (input_control)  </span><span>integer-array <code>→</code> <span data-if="dotnet" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="python" style="display:none">Sequence[int]</span><span data-if="cpp" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="c" style="display:none">Htuple</span><span data-if="hdevelop" style="display:inline"> (integer)</span><span data-if="dotnet" style="display:none"> (<i>int</i> / </span><span data-if="dotnet" style="display:none">long)</span><span data-if="cpp" style="display:none"> (<i>Hlong</i>)</span><span data-if="c" style="display:none"> (<i>Hlong</i>)</span></span>
</div>
<p class="pardesc">Height of a character.</p>
<p class="pardesc"><span class="parcat">Default:
      </span>25</p>
<p class="pardesc"><span class="parcat">Value range:
      </span><code>1
          ≤
        
    <span data-if="hdevelop" style="display:inline">CharHeight</span>
    <span data-if="c" style="display:none">CharHeight</span>
    <span data-if="cpp" style="display:none">CharHeight</span>
    <span data-if="com" style="display:none">CharHeight</span>
    <span data-if="dotnet" style="display:none">charHeight</span>
    <span data-if="python" style="display:none">char_height</span>
    </code></p>
</div>
  <div class="par">
<div class="parhead">
<span id="ThresholdOffset" class="parname"><b><code><span data-if="hdevelop" style="display:inline">ThresholdOffset</span><span data-if="c" style="display:none">ThresholdOffset</span><span data-if="cpp" style="display:none">ThresholdOffset</span><span data-if="com" style="display:none">ThresholdOffset</span><span data-if="dotnet" style="display:none">thresholdOffset</span><span data-if="python" style="display:none">threshold_offset</span></code></b> (input_control)  </span><span>integer <code>→</code> <span data-if="dotnet" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="python" style="display:none">int</span><span data-if="cpp" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="c" style="display:none">Htuple</span><span data-if="hdevelop" style="display:inline"> (integer)</span><span data-if="dotnet" style="display:none"> (<i>int</i> / </span><span data-if="dotnet" style="display:none">long)</span><span data-if="cpp" style="display:none"> (<i>Hlong</i>)</span><span data-if="c" style="display:none"> (<i>Hlong</i>)</span></span>
</div>
<p class="pardesc">Value to adjust the segmentation.</p>
<p class="pardesc"><span class="parcat">Default:
      </span>0</p>
</div>
  <div class="par">
<div class="parhead">
<span id="Contrast" class="parname"><b><code><span data-if="hdevelop" style="display:inline">Contrast</span><span data-if="c" style="display:none">Contrast</span><span data-if="cpp" style="display:none">Contrast</span><span data-if="com" style="display:none">Contrast</span><span data-if="dotnet" style="display:none">contrast</span><span data-if="python" style="display:none">contrast</span></code></b> (input_control)  </span><span>integer <code>→</code> <span data-if="dotnet" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="python" style="display:none">int</span><span data-if="cpp" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="c" style="display:none">Htuple</span><span data-if="hdevelop" style="display:inline"> (integer)</span><span data-if="dotnet" style="display:none"> (<i>int</i> / </span><span data-if="dotnet" style="display:none">long)</span><span data-if="cpp" style="display:none"> (<i>Hlong</i>)</span><span data-if="c" style="display:none"> (<i>Hlong</i>)</span></span>
</div>
<p class="pardesc">Minimum gray value difference between text and
background.</p>
<p class="pardesc"><span class="parcat">Default:
      </span>10</p>
</div>
  <div class="par">
<div class="parhead">
<span id="UsedThreshold" class="parname"><b><code><span data-if="hdevelop" style="display:inline">UsedThreshold</span><span data-if="c" style="display:none">UsedThreshold</span><span data-if="cpp" style="display:none">UsedThreshold</span><span data-if="com" style="display:none">UsedThreshold</span><span data-if="dotnet" style="display:none">usedThreshold</span><span data-if="python" style="display:none">used_threshold</span></code></b> (output_control)  </span><span>integer(-array) <code>→</code> <span data-if="dotnet" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="python" style="display:none">Sequence[int]</span><span data-if="cpp" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="c" style="display:none">Htuple</span><span data-if="hdevelop" style="display:inline"> (integer)</span><span data-if="dotnet" style="display:none"> (<i>int</i> / </span><span data-if="dotnet" style="display:none">long)</span><span data-if="cpp" style="display:none"> (<i>Hlong</i>)</span><span data-if="c" style="display:none"> (<i>Hlong</i>)</span></span>
</div>
<p class="pardesc">Threshold used to segment the characters.</p>
</div>
<h2 id="sec_example_all">例程 (HDevelop)</h2>
<pre class="example">
for Index := 1 to 5 by 1
  read_image (Image, 'dot_print_rotated/dot_print_rotated_'+Index$'02d')
  text_line_orientation (Image, Image, 50, rad(-30), rad(30), \
                         OrientationAngle)
  rotate_image (Image, ImageRotate, deg(-OrientationAngle), 'constant')
  segment_characters (ImageRotate, ImageRotate, ImageForeground, \
                      RegionForeground, 'local_auto_shape', 'false', \
                      'false', 'medium', 25, 25, 0, 10, UsedThreshold)
endfor
</pre>
<h2 id="sec_result">结果</h2>
<p>If the input parameters are set correctly, 该算子
<code><span data-if="hdevelop" style="display:inline">segment_characters</span><span data-if="c" style="display:none">segment_characters</span><span data-if="cpp" style="display:none">SegmentCharacters</span><span data-if="com" style="display:none">SegmentCharacters</span><span data-if="dotnet" style="display:none">SegmentCharacters</span><span data-if="python" style="display:none">segment_characters</span></code> 返回值 <TT>2</TT> (
      <TT>H_MSG_TRUE</TT>)
    .  Otherwise an
exception will be raised.</p>
<h2 id="sec_predecessors">可能的前置算子</h2>
<p>
<code><a href="text_line_orientation.html"><span data-if="hdevelop" style="display:inline">text_line_orientation</span><span data-if="c" style="display:none">text_line_orientation</span><span data-if="cpp" style="display:none">TextLineOrientation</span><span data-if="com" style="display:none">TextLineOrientation</span><span data-if="dotnet" style="display:none">TextLineOrientation</span><span data-if="python" style="display:none">text_line_orientation</span></a></code>
</p>
<h2 id="sec_successors">可能的后置算子</h2>
<p>
<code><a href="select_characters.html"><span data-if="hdevelop" style="display:inline">select_characters</span><span data-if="c" style="display:none">select_characters</span><span data-if="cpp" style="display:none">SelectCharacters</span><span data-if="com" style="display:none">SelectCharacters</span><span data-if="dotnet" style="display:none">SelectCharacters</span><span data-if="python" style="display:none">select_characters</span></a></code>, 
<code><a href="connection.html"><span data-if="hdevelop" style="display:inline">connection</span><span data-if="c" style="display:none">connection</span><span data-if="cpp" style="display:none">Connection</span><span data-if="com" style="display:none">Connection</span><span data-if="dotnet" style="display:none">Connection</span><span data-if="python" style="display:none">connection</span></a></code>
</p>
<h2 id="sec_alternatives">可替代算子</h2>
<p>
<code><a href="threshold.html"><span data-if="hdevelop" style="display:inline">threshold</span><span data-if="c" style="display:none">threshold</span><span data-if="cpp" style="display:none">Threshold</span><span data-if="com" style="display:none">Threshold</span><span data-if="dotnet" style="display:none">Threshold</span><span data-if="python" style="display:none">threshold</span></a></code>
</p>
<h2 id="sec_module">模块</h2>
<p>
Foundation</p>
<!--OP_REF_FOOTER_START-->
<hr>
<div class="indexlink">
<a href="index_classes.html"><span data-if="dotnet" style="display:none;">类别</span><span data-if="cpp" style="display:none;">类别</span></a><span data-if="dotnet" style="display:none;"> | </span><span data-if="cpp" style="display:none;"> | </span><a href="index_by_name.html">算子列表</a>
</div>
<div class="footer">
<div class="copyright">HALCON算子参考手册 Copyright © 2015-2023 51Halcon</div>
</div>
</div>
</body>
</html>
